<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #wrapper{
          width: 100%;
          height: 140px;
          background-color: rgba(0, 0, 0, 0.8);
          
          color: white;
          font-size: 30px;
          font-weight: bold;
          line-height: 140px;
          text-align: center;

        }

    </style>
</head>
<body>
     <div id="wrapper"></div>
</body>
</html>
<script>
     var count=1;
     function moveAction(){
        oWrapper.innerHTML=count++
     }
     var oWrapper=document.querySelector('#wrapper')
     oWrapper.onmousemove=throttle(moveAction,1000)

     function throttle(fun,wait){
        var timeout,context,age,result;
        var previous=0;

        var later=function(){
            previous=+new Date()
            timeout=null;
            fun.apply(context,args)
        }
       var throttled=function(){
            var now=+new Date()
            var remaining=wait-(now-previous)
            context=this
            args=arguments;
            if(remaining<=0||remaining>wait){
               if(timeout){
                   clearTimeout(timeout)
                   timeout=null
               }
               provious=now
               fun.apply(context,args)
            }else if(!timeout){
                 timeout=setTimeout(later,remaining)
            }
       }
        return throttled

     }


</script>